package com.etc.test2;

public class Target {
    
    public void aaa() {
        System.out.println("aaa");
    }
    public static void main(String[] args) {
        Target t1 = new Target();
        Target_Proxy prox = new Target_Proxy(t1);
        prox.aaa();
    }
}
class Target_Proxy {
    
    private Target target;

    public Target_Proxy(Target target) {
        super();
        this.target = target;
    }
    
    public void aaa() {
        try {
            System.out.println("------之前-----");
            target.aaa();
            System.out.println("------之后----"); 
        } catch (Exception e) {
            System.out.println("------异常------------");
        } finally {
            System.out.println("-------return 之前一定执行的----------------");
        }
    }
}
